import axios from '~/axios'

// 添加交易申请付款凭证
export function addTradeApplicationCreditApi(data) {
    return axios.post('/basic/lindi/tradeApplicationCredit/addTradeApplicationCredit', data)
}

// 删除交易申请付款凭证
export function deleteTradeApplicationCreditByTradeApplicationCreditIdApi(tradeApplicationCreditId) {
    return axios({
        method: 'DELETE',
        url: '/basic/lindi/tradeApplicationCredit/deleteTradeApplicationCreditByTradeApplicationCreditId',
        params: {
            tradeApplicationCreditId: tradeApplicationCreditId
        }
    })
}

// 修改交易申请付款凭证
export function updateTradeApplicationCreditByTradeApplicationCreditIdApi(data) {
    return axios.put('/basic/lindi/tradeApplicationCredit/updateTradeApplicationCreditByTradeApplicationCreditId', data)
}

// 分页查询交易申请付款凭证列表
export function getPageTradeApplicationCreditListApi(params) {
    return axios({
        method: 'GET',
        url: '/basic/lindi/tradeApplicationCredit/getPageTradeApplicationCreditList',
        params: params
    })
}

// 根据ID查询交易申请付款凭证详情
export function getTradeApplicationCreditByTradeApplicationCreditIdApi(tradeApplicationCreditId) {
    return axios.get(`/basic/lindi/tradeApplicationCredit/getTradeApplicationCreditByTradeApplicationCreditId/${tradeApplicationCreditId}`)
}

// 根据交易申请ID查询交易申请付款凭证列表
export function getTradeApplicationCreditListByTradeApplicationIdApi(tradeApplicationId) {
    return axios.get(`/basic/lindi/tradeApplicationCredit/getTradeApplicationCreditListByTradeApplicationId/${tradeApplicationId}`)
}